<?php
/**
 * The template used for displaying page content in page.php
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="item clearfix">
    <a href="<?php echo get_permalink($post->ID); ?>"
       title="<?php echo htmlspecialchars($post->post_title); ?>">
    <?php
    if ( has_post_thumbnail($post->ID) ) { // check if the post has a Post Thumbnail assigned to it.
        echo get_the_post_thumbnail($post->ID, array(75,75));
    } else {
        echo '<img src="'. get_template_directory_uri().'/assets/images/vm_tumb.jpg" alt="" />';
    }?>
    </a>
    <a href="<?php echo get_permalink($post->ID); ?>"
       title="<?php echo htmlspecialchars($post->post_title); ?>"><?php echo $post->post_title ?></a><br>
    <?php echo $post->post_excerpt?>
     <div class="tools">
        <span class="date"><span><?php echo date("H:i ",strtotime($post->post_date)); ?></span><?php echo date("d/m",strtotime($post->post_date)); ?></span>
    <?php
        $post_categories = wp_get_post_categories($post->ID);
        $cats = array();
        
        foreach($post_categories as $c){
            $cat = get_category( $c );
            echo "<a href='/category/".$cat->slug."' class='category'>".$cat->name." </a>";
        }
    ?>
    </div>
</div>
<?php endwhile; // End the loop. Whew. ?>

